﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using QLTV.Public;
using QLTV.DAL;

namespace QLTV.BLL
{
    public class QuyDinhBLL
    {
        QuyDinhDAL qdDAL = new QuyDinhDAL();
        public static QuyDinhDTO qdDTO { get; set; }
        public DataTable QuyDinh_LoadDuLieu()
        {
            try
            {
                return qdDAL.QuyDinh_LoadDuLieu();
            }
            catch (SqlException ex)
            {
                throw ex;
            }
        }
        public int QuyDinh_Update(QuyDinhDTO qdDTO)
        {
            try
            {
                return qdDAL.QuyDinh_UPDATE(qdDTO);
            }
            catch (SqlException ex)
            {

                throw ex;
            }
        }
        public int GetTuoiLonNhat() {
            try {
                return qdDAL.GetTuoiLonNhat();

            }catch(SqlException ex){
                throw ex;
            }
            
        }
        public int GetTuoiNhoNhat() {
            try {

                return qdDAL.GetTuoiNhoNhat();
            }catch(SqlException ex){
                throw ex;
            }
        }
    }
}
